//+build wireinject

package wire

import (
	"github.com/google/wire"

	"clean/adapter/third/sensitive_word"
	"clean/infra/config"
	"clean/infra/io"
	"clean/infra/io/driver"
	"clean/infra/repo"
	"clean/usecase"
)

var appBaseSet = wire.NewSet(
	io.Create,
	usecase.NewInput,
	wire.Struct(new(usecase.App), "*"),
	repo.Create,
)


var otherItfSet = wire.NewSet(
	wire.InterfaceValue(new(usecase.SensitiveWords), new(sensitive_word.Sensitive)),
)

func InitServer(cfg config.Config) (io_driver.Io, error) {
	panic(
		wire.Build(
			wire.NewSet(
				appBaseSet, otherItfSet,
			)),
	)
}
